<template>
  <div class="app-container" style="width: 600px;">
    <el-form ref="form" :model="form" label-width="120px">
      <el-form-item label="班级名称">
        <el-input v-model="form.name" />
      </el-form-item>
      <el-form-item label="所属专业部">
        <el-select v-model="form.region" placeholder="请选择所属专业部">
          <el-option label="电子商务" value="dianshang" />
          <el-option label="高校" value="gaoxiao" />
          <el-option label="机电" value="jidian" />
          <el-option label="现代服务" value="xiandai" />
        </el-select>
      </el-form-item>
      <el-form-item label="班主任">
        <el-input v-model="form.desc" />
      </el-form-item>

      <el-form-item label="班级总人数">
        <el-input-number v-model="form.num" controls-position="right" :min="1" :max="60"></el-input-number>
      </el-form-item>
      <el-form-item label="班级在校人数">
        <el-input-number v-model="form.num1" controls-position="right" :min="1" :max="60"></el-input-number>
      </el-form-item>
      <el-form-item label="人数异常说明">
        <el-input v-model="form.desc" type="textarea" />
      </el-form-item>
      <el-form-item label="班级简介">
        <el-input v-model="form.desc" type="textarea" />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">新建</el-button>
        <el-button @click="onCancel">取消</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {
        name: '',
        region: '',
        date1: '',
        date2: '',
        delivery: false,
        type: [],
        resource: '',
        desc: '',
        num: '',
        num1: ''
      }
    }
  },
  methods: {
    onSubmit() {
      this.$message('submit!')
    },
    onCancel() {
      this.$message({
        message: 'cancel!',
        type: 'warning'
      })
    }
  }
}
</script>

<style scoped>
.line {
  text-align: center;
}
</style>

